package cn.edu.zjgsu.ito.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import cn.edu.zjgsu.ito.model.AdminInfomation;
import cn.edu.zjgsu.ito.model.AdminLogin;
import cn.edu.zjgsu.ito.model.AdminVo;
import cn.edu.zjgsu.ito.model.ComplainView;
import cn.edu.zjgsu.ito.model.CourierVo;
import cn.edu.zjgsu.ito.model.OrderDetailInfomationView;
import cn.edu.zjgsu.ito.model.UserInfomation;
import cn.edu.zjgsu.ito.model.UserVo;
import cn.edu.zjgsu.ito.vo.CapitalVo;
import cn.edu.zjgsu.ito.vo.OrderDetailInfomationVo;
import cn.edu.zjgsu.ito.vo.OrderStatisticalVo;
import cn.edu.zjgsu.ito.vo.Page;

public interface IAdminService
{
	public Map login(String username, String password);

	public int delAdmin(int adminId);

	public int getTotalAdminCount();

	public int getTotalOrderCount();

	public int getTodayOrderCount();

	public int getTotalUserCount();

	public int getTotalCourierCount();

	public int addAdmin(AdminVo adminVo);

	public int closeAdmin(int adminId, int adminState);

	public int openAdmin(int adminId, int adminState);

	List<CourierVo> getCouriers(int pageCount,int pageSize,int sequence,String keyword);
	
	List<CourierVo> getCouriers(int sequence);
	
	/*public List<UserVo> getUsersWithPaging(int pageCount, int pageSize,
			int sequence, String keyword);*/
	public Page<UserVo> getUsersWithPaging(int pageCount, int pageSize,
			int sequence, String keyword);
	
	/*public List<CourierVo> getCouriersWithPaging(int pageCount, int pageSize,
			int sequence, String keyword);*/
	
	public Page<CourierVo> getCouriersWithPaging(int pageCount, int pageSize,
			int sequence, String keyword);
	
	/*public List<AdminVo> getAdminsWithPaging(int pageCount,
			int pageSize, int sequence, String keyword);*/

	/**
	 * 分页得到管理员(新)
	 * @param pageCount
	 * @param pageSize
	 * @param sequence
	 * @param keyword
	 * @return
	 */
	public Page<AdminVo> getAdminsWithPaging(int pageCount,
			int pageSize, int sequence, String keyword);
	
	public List<AdminVo> getAdmins(int sequence);
	
	public OrderDetailInfomationVo getOrderDetailInfomationByOrderId(int orderId);
	
	/*public List<OrderStatisticalVo> getDemandOrderByUserId(int userId,
			int sequence, String keyword, int pageCount, int pageSize);*/

	/*public Page<OrderStatisticalVo> getDemandOrderByUserId(int userId,
			int sequence, String keyword, int pageCount, int pageSize);*/
	
	public Page<OrderDetailInfomationView> getDemandOrderByUserId(int userId,
			int sequence, String keyword, int pageCount, int pageSize);
	
	public List<OrderDetailInfomationView> getDemandOrderByUserId(int userId,
			int sequence,int selectType,Date beginTime,Date endTime);
	
	/*public List<OrderStatisticalVo> getPurcaseOrderByUserId(int userId,
			int sequence, String keyword, int pageCount, int pageSize);*/

	/*public Page<OrderStatisticalVo> getPurcaseOrderByUserId(int userId,
			int sequence, String keyword, int pageCount, int pageSize);*/
	
	public Page<OrderDetailInfomationView> getPurcaseOrderByUserId(int userId,
			int sequence, String keyword, int pageCount, int pageSize);
	
	/*public List<OrderStatisticalVo> getAllOrderByUserId(int userId,
			int sequence, String keyword, int pageCount, int pageSize);*/

	/*public Page<OrderStatisticalVo> getAllOrderByUserId(int userId,
			int sequence, String keyword, int pageCount, int pageSize);*/
	
	public Page<OrderDetailInfomationView> getAllOrderByUserId(int userId,
			int sequence, String keyword, int pageCount, int pageSize);
	
	/*public List<OrderStatisticalVo> getAllOrders(
			int sequence, String keyword, int pageCount, int pageSize);*/
	
	public Page<OrderDetailInfomationView> getAllOrders(
			int sequence, String keyword, int pageCount, int pageSize);
	
	/*public List<OrderStatisticalVo> getOrderByCourierId(int courierId,int sequence,String key ,int pageCount,int pageSize);
	*/
	
	/*public Page<OrderStatisticalVo> getOrderByCourierId(int courierId,int sequence,String key ,int pageCount,int pageSize);*/

	public Page<OrderDetailInfomationView> getOrderByCourierId(int courierId,int sequence,String key ,int pageCount,int pageSize);
	
	
	public UserVo getUserByUserId(int userId);
	
	public AdminInfomation getAdminById(int adminId);

	public CourierVo getCourierByCourierId(int courierId);
	
	public List<Integer> getUsersNumberByDay(int day);
	
	public List<Integer> getActivityUsersNumberByDay(int day);
	
	public int resetPassowrd(int adminId, String newPassword);

	public int updateAdminWithoutPassword(AdminInfomation adminInfomation);
	
	public int updateAdminItself(AdminVo adminVo);

	public int checkAdminName(String adminName);
	
	public List<AdminLogin> test(int pageCount,int pageSize);
	
	public int closeAccount(int userId);
	
	/**
	 * 1.取得请求订单数量
	 * 2.取得代购订单数量
	 * 3.取得某个用户所有订单数量
	 * 4.取得所有订单
	 * 5.查询管理员数量
	 * 6.查询用户
	 * 7.查询快递员
	 */
	public int selectCount(int switchCase,int userId,String key,int sequence);
	
	/**
	 * 
	 * 根据快递员查询订单
	 * @param switchCase
	 * @param userId
	 * @param key
	 * @param sequence
	 * @param courierIdS
	 * @return
	 */
	public int selectCount(String keywords,int sequence,int courierId);

	
	/*public int closeOrderByOrderId(int orderId);
	
	public int openOrderByOrderId(int orderId);
	*/
	public int changeOrderStateByOrderId(int orderId,int state);

	public void deductUserIntegralScore(int userId, int integralScore);

	
	public void changeCourierState(int courierId,int state);
	
	public Page<ComplainView> getComplainByPaging(int state,int pageCount,int pageSize);

	
	public OrderDetailInfomationView getOrderDetailInfomationView(int orderId);

	public void completeComplain(int complainId);

	public void changeAccountState(int userId, int i);

	public ComplainView getComplainById(int complainId);

	public List<UserVo> getUsers(int sequence);

	public List<OrderDetailInfomationView> getAllOrderByCourierId(
			int courierId, int sequence);

	public List<OrderDetailInfomationView> getPurcaseOrderByUserId(int userId,
			int sequence, int selectType, Date beginTime, Date endTime);

	public List<OrderDetailInfomationView> getAllOrderByUserId(int userId,
			int sequence, int selectType, Date beginTime, Date endTime);

	public List<OrderDetailInfomationView> getAllOrders(int sequence,
			int selectType, Date beginTime, Date endTime);

	public List<ComplainView> getComplainByPaging(int state);

	public Integer selectOrderCountByState(int state);

	public int selectMoney(List<Integer> states);

	public List<CourierVo> getCouriersApproval(int sequence);

	public List<CapitalVo> getMoney(int sequenceInt);

	public List<UserInfomation> selectTopUser(int number);

	public List<CourierVo> selectTopCourier(int number);

	public int test();

	public int selectMoneyIn(Date beginTime, Date endTime,
			List<Integer> states);

	public int selectMoneyOut(Date beginTime, Date endTime,
			List<Integer> states);

	
	
	
}
